using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class PCIHistoryHypertensionMap : EntityTypeConfiguration<PCIHistoryHypertension>
    {
        public PCIHistoryHypertensionMap()
        {
            // Primary Key
            this.HasKey(t => t.PCIHP_ID);

            // Properties
            this.Property(t => t.PCIHP_IsHistory)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.PCIHP_IsHistoryYear)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.PCIHP_IsHistoryMonth)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.PCIHP_IsHistoryRemember)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.PCIHP_MostHypertension)
                .HasMaxLength(80);

            this.Property(t => t.PCIHP_AntihypertensiveDrugs)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_ACEIORARB)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_ACEIORARBBewrite)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_Blockers)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_BlockersBewrite)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_CalciumAntagonists)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_CalciumAntagonistsBewrite)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_Diuretics)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_DiureticsBewrite)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_Spironolactone)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_SpironolactoneBewrite)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_CompoundPreparation)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_CompoundPreparationBewrite)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_ChineseMedicine)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_ChineseMedicineBewrite)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_Other)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_OtherBewrite)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_PressureControl)
                .HasMaxLength(80);

            this.Property(t => t.PCIHP_BloodPressureControl)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.PCIHP_DiabetesYear)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.PCIHP_DiabetesMonth)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.PCIHP_IsDiabetesRemember)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.PCIHP_FastingPlasmaGlucose)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.PCIHP_IsBooldRemember)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_PostprandialGlucose)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.PCIHP_IsRemember)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_AntidiabeticDrugs)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_Insulin)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_InsulinBewrite)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_Metformin)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_MetforminBewrite)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_Sulfonylureas)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_SulfonylureasBewrite)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_glucosidaseInhibitors)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_glucosidaseInhibitorsBewrite)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_Sensitizers)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_SensitizersBewrite)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_BPChineseMedicine)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_BPChineseMedicineBewrite)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_GlycemicControl)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_parentalHistory)
                .HasMaxLength(50);

            this.Property(t => t.PCIHP_siblingHistory)
                .HasMaxLength(50);

            this.Property(t => t.Patient_id)
                .HasMaxLength(20);

            this.Property(t => t.create_by)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("PCIHistoryHypertension");
            this.Property(t => t.PCIHP_ID).HasColumnName("PCIHP_ID");
            this.Property(t => t.PCIHP_IsHistory).HasColumnName("PCIHP_IsHistory");
            this.Property(t => t.PCIHP_IsHistoryYear).HasColumnName("PCIHP_IsHistoryYear");
            this.Property(t => t.PCIHP_IsHistoryMonth).HasColumnName("PCIHP_IsHistoryMonth");
            this.Property(t => t.PCIHP_IsHistoryRemember).HasColumnName("PCIHP_IsHistoryRemember");
            this.Property(t => t.PCIHP_MostHypertension).HasColumnName("PCIHP_MostHypertension");
            this.Property(t => t.PCIHP_AntihypertensiveDrugs).HasColumnName("PCIHP_AntihypertensiveDrugs");
            this.Property(t => t.PCIHP_ACEIORARB).HasColumnName("PCIHP_ACEIORARB");
            this.Property(t => t.PCIHP_ACEIORARBBewrite).HasColumnName("PCIHP_ACEIORARBBewrite");
            this.Property(t => t.PCIHP_Blockers).HasColumnName("PCIHP_Blockers");
            this.Property(t => t.PCIHP_BlockersBewrite).HasColumnName("PCIHP_BlockersBewrite");
            this.Property(t => t.PCIHP_CalciumAntagonists).HasColumnName("PCIHP_CalciumAntagonists");
            this.Property(t => t.PCIHP_CalciumAntagonistsBewrite).HasColumnName("PCIHP_CalciumAntagonistsBewrite");
            this.Property(t => t.PCIHP_Diuretics).HasColumnName("PCIHP_Diuretics");
            this.Property(t => t.PCIHP_DiureticsBewrite).HasColumnName("PCIHP_DiureticsBewrite");
            this.Property(t => t.PCIHP_Spironolactone).HasColumnName("PCIHP_Spironolactone");
            this.Property(t => t.PCIHP_SpironolactoneBewrite).HasColumnName("PCIHP_SpironolactoneBewrite");
            this.Property(t => t.PCIHP_CompoundPreparation).HasColumnName("PCIHP_CompoundPreparation");
            this.Property(t => t.PCIHP_CompoundPreparationBewrite).HasColumnName("PCIHP_CompoundPreparationBewrite");
            this.Property(t => t.PCIHP_ChineseMedicine).HasColumnName("PCIHP_ChineseMedicine");
            this.Property(t => t.PCIHP_ChineseMedicineBewrite).HasColumnName("PCIHP_ChineseMedicineBewrite");
            this.Property(t => t.PCIHP_Other).HasColumnName("PCIHP_Other");
            this.Property(t => t.PCIHP_OtherBewrite).HasColumnName("PCIHP_OtherBewrite");
            this.Property(t => t.PCIHP_PressureControl).HasColumnName("PCIHP_PressureControl");
            this.Property(t => t.PCIHP_BloodPressureControl).HasColumnName("PCIHP_BloodPressureControl");
            this.Property(t => t.PCIHP_DiabetesYear).HasColumnName("PCIHP_DiabetesYear");
            this.Property(t => t.PCIHP_DiabetesMonth).HasColumnName("PCIHP_DiabetesMonth");
            this.Property(t => t.PCIHP_IsDiabetesRemember).HasColumnName("PCIHP_IsDiabetesRemember");
            this.Property(t => t.PCIHP_FastingPlasmaGlucose).HasColumnName("PCIHP_FastingPlasmaGlucose");
            this.Property(t => t.PCIHP_IsBooldRemember).HasColumnName("PCIHP_IsBooldRemember");
            this.Property(t => t.PCIHP_PostprandialGlucose).HasColumnName("PCIHP_PostprandialGlucose");
            this.Property(t => t.PCIHP_IsRemember).HasColumnName("PCIHP_IsRemember");
            this.Property(t => t.PCIHP_AntidiabeticDrugs).HasColumnName("PCIHP_AntidiabeticDrugs");
            this.Property(t => t.PCIHP_Insulin).HasColumnName("PCIHP_Insulin");
            this.Property(t => t.PCIHP_InsulinBewrite).HasColumnName("PCIHP_InsulinBewrite");
            this.Property(t => t.PCIHP_Metformin).HasColumnName("PCIHP_Metformin");
            this.Property(t => t.PCIHP_MetforminBewrite).HasColumnName("PCIHP_MetforminBewrite");
            this.Property(t => t.PCIHP_Sulfonylureas).HasColumnName("PCIHP_Sulfonylureas");
            this.Property(t => t.PCIHP_SulfonylureasBewrite).HasColumnName("PCIHP_SulfonylureasBewrite");
            this.Property(t => t.PCIHP_glucosidaseInhibitors).HasColumnName("PCIHP_glucosidaseInhibitors");
            this.Property(t => t.PCIHP_glucosidaseInhibitorsBewrite).HasColumnName("PCIHP_glucosidaseInhibitorsBewrite");
            this.Property(t => t.PCIHP_Sensitizers).HasColumnName("PCIHP_Sensitizers");
            this.Property(t => t.PCIHP_SensitizersBewrite).HasColumnName("PCIHP_SensitizersBewrite");
            this.Property(t => t.PCIHP_BPChineseMedicine).HasColumnName("PCIHP_BPChineseMedicine");
            this.Property(t => t.PCIHP_BPChineseMedicineBewrite).HasColumnName("PCIHP_BPChineseMedicineBewrite");
            this.Property(t => t.PCIHP_GlycemicControl).HasColumnName("PCIHP_GlycemicControl");
            this.Property(t => t.PCIHP_parentalHistory).HasColumnName("PCIHP_parentalHistory");
            this.Property(t => t.PCIHP_siblingHistory).HasColumnName("PCIHP_siblingHistory");
            this.Property(t => t.Patient_id).HasColumnName("Patient_id");
            this.Property(t => t.Follow_up_id).HasColumnName("Follow_up_id");
            this.Property(t => t.create_by).HasColumnName("create_by");
        }
    }
}
